#pragma once

#include "Core\NervusSharedHeader.h"

namespace Nervus {
	namespace Core {
		class Chrono{
		private:
			LARGE_INTEGER* mTicksPerSec;
			LARGE_INTEGER* mMsrmStart;
			LARGE_INTEGER* mMsrmEnd;
			LARGE_INTEGER* mMsrmElapsed;
			LARGE_INTEGER* mTimeStamp;


			map<u32, u32> mTimerTicks;
		public:
			Chrono();
			~Chrono();

			u32 getTime();
			u64 getTime64();
			u64 getTimeMicro64();

			bool tickEveryMilis(u32);

			//Starts perfomance test
			void startMeasure();
			//Ends perfomance test, writes result in microseconds
			void endMeasure(u64&);
		};
	}
}